package scc.project.dao;

import org.apache.ibatis.annotations.Param;
import scc.project.entity.Goods;

import java.util.List;

public interface GoodsDao {

    List<Goods> find(@Param("offset") int offset,
                     @Param("page") Integer page,
                     @Param("goodsName") String goodsName,
                     @Param("supplier") String supplier);

    Long findTotal(@Param("goodsName") String goodsName,
                   @Param("supplier") String supplier);

    Goods selectById(Long id);

    List<Goods> selectAll();

    int updateNumberById(@Param("number") Integer number,
                         @Param("id") Long id);

    Goods getByName(String name);

    int insert(Goods goods);
}